import datetime
a='1/2'
tmp = a
pos = tmp.find('/')
if pos<0:
    pos = tmp.find('-')
if pos>0:
    day = int(tmp[:pos])
    tmp = tmp[pos+1:]
    month = False
    print "Day: " + str(day)
    pos = tmp.find('/')
    if pos<0:
        pos = tmp.find('-')
    if pos>=0:
        month = tmp[:pos]
        tmp = tmp[pos+1:]
    elif tmp.isdigit():
        month=tmp
        tmp = ''
    print "Month: " + str(month)
    if tmp.isdigit() and tmp<>'':
        year = tmp
    else:
        now = datetime.datetime.now()
        year = now.year
    print "Year: " + str(year)
        